package com.usabb.domain;


import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.ifast.common.base.BaseDO;

import com.usabb.pojo.vo.CombosAddVO;
import com.usabb.pojo.vo.CombosNewAddVO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * 
 * <pre>
 * 月子中心 套餐
 * </pre>
 * <small> 2019-08-19 18:03:27 | Aron</small>
 */
@Data
@SuppressWarnings("serial")
@TableName("maternity_combos")
@EqualsAndHashCode(callSuper=true) 
public class MaternityCombosDO extends BaseDO {
	@TableId
	private Long id;

    /** 外键,月子中心Id */
    private Long baseId;

    /** 套餐名称 */
    private String combosName;

    /** 套餐金额 */
    private String combosFee;


    @TableField(exist = false)
    List<CombosCategoryDO> categoryDOS;



    public static MaternityCombosDO ofBase(CombosAddVO addVO) {
        MaternityCombosDO combosDO = new MaternityCombosDO();
        combosDO.setBaseId(addVO.getBaseId());
        combosDO.setCombosName(addVO.getCombosName());
        combosDO.setCombosFee(addVO.getCombosFee());

        return combosDO;
    }

    public static MaternityCombosDO of(CombosNewAddVO addVO) {
        MaternityCombosDO combosDO = new MaternityCombosDO();
        combosDO.setBaseId(addVO.getBaseId());
        combosDO.setCombosName(addVO.getCombosName());
        combosDO.setCombosFee(addVO.getCombosFee());

        return combosDO;
    }

}
